Fix some more deprecation warnings
authorAlex Crichton <alex@alexcrichton.com>
Wed, 17 Sep 2014 15:27:41 +0000 (08:27 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 17 Sep 2014 15:27:41 +0000 (08:27 -0700)
tests/test_cargo.rs
tests/test_cargo_compile_git_deps.rs

index cb5334c6be632656c8a5daa05bfe6145b592a6b8..a4ce15a981f6cc2dd85815b54edb5dab3ea4cfb2 100644 (file)
@@ -26,7 +26,7 @@ fn fake_executable(proj: ProjectBuilder, dir: &Path, name: &str) -> ProjectBuild
 // installation as we don't want it to muck with the --list tests
 fn new_path() -> Vec<Path> {
     let path = os::getenv_as_bytes("PATH").unwrap_or(Vec::new());
-    os::split_paths(path).move_iter().filter(|p| {
+    os::split_paths(path).into_iter().filter(|p| {
         !p.join(format!("cargo{}", os::consts::EXE_SUFFIX)).exists()
     }).collect()
 }
index 9c4bf20c63f54599414588ae897731fa1dd7b372..181de8f9b698f804a793caa953e9f7d1f308caad 100644 (file)
@@ -37,7 +37,7 @@ fn add(repo: &git2::Repository) {
     // as well, and then fail b/c they're a directory. As a stopgap, we just
     // ignore all submodules.
     let mut s = repo.submodules().unwrap();
-    for submodule in s.mut_iter() {
+    for submodule in s.iter_mut() {
         submodule.add_to_index(false).unwrap();
     }
     let mut index = repo.index().unwrap();
@@ -459,14 +459,14 @@ test!(two_revs_same_deps {
     }).assert();
 
     let repo = git2::Repository::open(&bar.root()).unwrap();
-    let rev1 = repo.revparse_single("HEAD").unwrap().id().to_string();
+    let rev1 = repo.revparse_single("HEAD").unwrap().id();
 
     // Commit the changes and make sure we trigger a recompile
     File::create(&bar.root().join("src/lib.rs")).write_str(r#"
         pub fn bar() -> int { 2 }
     "#).assert();
     add(&repo);
-    let rev2 = commit(&repo).to_string();
+    let rev2 = commit(&repo);
 
     let foo = project("foo")
         .file("Cargo.toml", format!(r#"
@@ -481,7 +481,7 @@ test!(two_revs_same_deps {
 
             [dependencies.baz]
             path = "../baz"
-        "#, bar.url(), rev1.as_slice().trim()).as_slice())
+        "#, bar.url(), rev1).as_slice())
         .file("src/main.rs", r#"
             extern crate bar;
             extern crate baz;
@@ -502,7 +502,7 @@ test!(two_revs_same_deps {
             [dependencies.bar]
             git = '{}'
             rev = "{}"
-        "#, bar.url(), rev2.as_slice().trim()).as_slice())
+        "#, bar.url(), rev2).as_slice())
         .file("src/lib.rs", r#"
             extern crate bar;
             pub fn baz() -> int { bar::bar() }